import request from '@/utils/request'

// 查询店铺目录列表
export function listDirectory(query) {
  return request({
    url: '/product/directory/list',
    method: 'get',
    params: query
  })
}

// 查询店铺目录详细
export function getDirectory(id) {
  return request({
    url: '/product/directory/' + id,
    method: 'get'
  })
}

// 新增店铺目录
export function addDirectory(data) {
  return request({
    url: '/product/directory',
    method: 'post',
    data: data
  })
}

// 修改店铺目录
export function updateDirectory(data) {
  return request({
    url: '/product/directory',
    method: 'put',
    data: data
  })
}

// 删除店铺目录
export function delDirectory(id) {
  return request({
    url: '/product/directory/' + id,
    method: 'delete'
  })
}

// 查询店铺目录下拉树结构
export function treeselect() {
  return request({
    url: '/product/directory/treeselect',
    method: 'get'
  })
}
